import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-03-30
 * Time: 15:27
 */
class Person implements Cloneable {
    String name;
    String[] hobbies;  // 引用类型字段

    public Person(String name, String[] hobbies) {
        this.name = name;
        this.hobbies = hobbies;
    }

    // 重写 clone() 方法实现浅拷贝
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public String toString() {
        return name + "-" +  Arrays.toString(hobbies);
    }
}
